package com.jast.business.service.impl;

import java.util.List;
import com.jast.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jast.business.mapper.BigdataHdfsKvLineMapper;
import com.jast.business.domain.BigdataHdfsKvLine;
import com.jast.business.service.IBigdataHdfsKvLineService;
import com.jast.common.core.text.Convert;

/**
 * HDFS监控指标近3天指标Service业务层处理
 * 
 * @author Jast
 * @date 2023-02-08
 */
@Service
public class BigdataHdfsKvLineServiceImpl implements IBigdataHdfsKvLineService 
{
    @Autowired
    private BigdataHdfsKvLineMapper bigdataHdfsKvLineMapper;

    /**
     * 查询HDFS监控指标近3天指标
     * 
     * @param id HDFS监控指标近3天指标主键
     * @return HDFS监控指标近3天指标
     */
    @Override
    public BigdataHdfsKvLine selectBigdataHdfsKvLineById(Long id)
    {
        return bigdataHdfsKvLineMapper.selectBigdataHdfsKvLineById(id);
    }

    /**
     * 查询HDFS监控指标近3天指标列表
     * 
     * @param bigdataHdfsKvLine HDFS监控指标近3天指标
     * @return HDFS监控指标近3天指标
     */
    @Override
    public List<BigdataHdfsKvLine> selectBigdataHdfsKvLineList(BigdataHdfsKvLine bigdataHdfsKvLine)
    {
        return bigdataHdfsKvLineMapper.selectBigdataHdfsKvLineList(bigdataHdfsKvLine);
    }

    /**
     * 新增HDFS监控指标近3天指标
     * 
     * @param bigdataHdfsKvLine HDFS监控指标近3天指标
     * @return 结果
     */
    @Override
    public int insertBigdataHdfsKvLine(BigdataHdfsKvLine bigdataHdfsKvLine)
    {
        bigdataHdfsKvLine.setCreateTime(DateUtils.getNowDate());
        return bigdataHdfsKvLineMapper.insertBigdataHdfsKvLine(bigdataHdfsKvLine);
    }

    /**
     * 更新/新增HDFS监控指标近3天指标
     *
     * @param bigdataHdfsKvLine HDFS监控指标近3天指标
     * @return 结果
     */
    @Override
    public int upsertBigdataHdfsKvLine(BigdataHdfsKvLine bigdataHdfsKvLine)
    {
                bigdataHdfsKvLine.setUpdateTime(DateUtils.getNowDate());
            return bigdataHdfsKvLineMapper.upsertBigdataHdfsKvLine(bigdataHdfsKvLine);
    }

    /**
     * 修改HDFS监控指标近3天指标
     * 
     * @param bigdataHdfsKvLine HDFS监控指标近3天指标
     * @return 结果
     */
    @Override
    public int updateBigdataHdfsKvLine(BigdataHdfsKvLine bigdataHdfsKvLine)
    {
        bigdataHdfsKvLine.setUpdateTime(DateUtils.getNowDate());
        return bigdataHdfsKvLineMapper.updateBigdataHdfsKvLine(bigdataHdfsKvLine);
    }

    /**
     * 批量删除HDFS监控指标近3天指标
     * 
     * @param ids 需要删除的HDFS监控指标近3天指标主键
     * @return 结果
     */
    @Override
    public int deleteBigdataHdfsKvLineByIds(String ids)
    {
        return bigdataHdfsKvLineMapper.deleteBigdataHdfsKvLineByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除HDFS监控指标近3天指标信息
     * 
     * @param id HDFS监控指标近3天指标主键
     * @return 结果
     */
    @Override
    public int deleteBigdataHdfsKvLineById(Long id)
    {
        return bigdataHdfsKvLineMapper.deleteBigdataHdfsKvLineById(id);
    }

}
